.class public Lcom/glympse/android/glympse/ViewSendGlympse$OnKeyListenerDestination;
.super Ljava/lang/Object;
.source "ViewSendGlympse.java"

# interfaces
.implements Landroid/view/View$OnKeyListener;


# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
    value = Lcom/glympse/android/glympse/ViewSendGlympse;
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x1
    name = "OnKeyListenerDestination"
.end annotation


# instance fields
.field final synthetic this$0:Lcom/glympse/android/glympse/ViewSendGlympse;


# direct methods
.method public constructor <init>(Lcom/glympse/android/glympse/ViewSendGlympse;)V
    .locals 0
    .parameter

    .prologue
    .line 1281
    iput-object p1, p0, Lcom/glympse/android/glympse/ViewSendGlympse$OnKeyListenerDestination;->this$0:Lcom/glympse/android/glympse/ViewSendGlympse;

    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    return-void
.end method


# virtual methods
.method public onKey(Landroid/view/View;ILandroid/view/KeyEvent;)Z
    .locals 8
    .parameter "oView"
    .parameter "nKeyCode"
    .parameter "oKeyEvent"

    .prologue
    const-wide/16 v2, 0x0

    .line 1287
    sget-object v0, Lcom/glympse/android/glympse/Glympse$EViews;->Search:Lcom/glympse/android/glympse/Glympse$EViews;

    sget-object v1, Lcom/glympse/android/glympse/Glympse;->ms_oThis:Lcom/glympse/android/glympse/Glympse;

    invoke-virtual {v1}, Lcom/glympse/android/glympse/Glympse;->GetCurrentEView()Lcom/glympse/android/glympse/Glympse$EViews;

    move-result-object v1

    if-eq v0, v1, :cond_1

    .line 1290
    const/16 v0, 0x43

    if-eq v0, p2, :cond_0

    const/16 v0, 0x70

    if-ne v0, p2, :cond_2

    .line 1292
    :cond_0
    iget-object v0, p0, Lcom/glympse/android/glympse/ViewSendGlympse$OnKeyListenerDestination;->this$0:Lcom/glympse/android/glympse/ViewSendGlympse;

    const-string v1, ""

    move-wide v4, v2

    invoke-virtual/range {v0 .. v5}, Lcom/glympse/android/glympse/ViewSendGlympse;->SetDestination(Ljava/lang/String;DD)V

    .line 1321
    :cond_1
    :goto_0
    const/4 v0, 0x0

    return v0

    .line 1299
    :cond_2
    const/4 v6, 0x0

    .line 1302
    .local v6, cChar:C
    :try_start_0
    invoke-virtual {p3}, Landroid/view/KeyEvent;->getDeviceId()I

    move-result v0

    invoke-static {v0}, Landroid/view/KeyCharacterMap;->load(I)Landroid/view/KeyCharacterMap;

    move-result-object v0

    invoke-virtual {p3}, Landroid/view/KeyEvent;->getMetaState()I

    move-result v1

    invoke-virtual {v0, p2, v1}, Landroid/view/KeyCharacterMap;->get(II)I
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    move-result v0

    int-to-char v6, v0

    .line 1310
    :goto_1
    if-lez v6, :cond_1

    .line 1313
    sget-object v0, Lcom/glympse/android/glympse/Glympse;->ms_oThis:Lcom/glympse/android/glympse/Glympse;

    iget-object v0, v0, Lcom/glympse/android/glympse/Glympse;->m_oViewSearch:Lcom/glympse/android/glympse/ViewSearch;

    const/16 v1, 0x20

    if-le v6, v1, :cond_3

    sget-object v1, Lcom/glympse/android/glympse/Glympse;->ms_oThis:Lcom/glympse/android/glympse/Glympse;

    iget-object v1, v1, Lcom/glympse/android/glympse/Glympse;->m_oViewSearch:Lcom/glympse/android/glympse/ViewSearch;

    if-eqz v1, :cond_3

    new-instance v1, Ljava/lang/StringBuilder;

    invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V

    invoke-static {v6}, Ljava/lang/Character;->toUpperCase(C)C

    move-result v2

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(C)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v1

    :goto_2
    iput-object v1, v0, Lcom/glympse/android/glympse/ViewSearch;->m_strInitialText:Ljava/lang/String;

    .line 1316
    sget-object v0, Lcom/glympse/android/glympse/Glympse;->ms_oThis:Lcom/glympse/android/glympse/Glympse;

    sget-object v1, Lcom/glympse/android/glympse/Glympse$EViews;->Search:Lcom/glympse/android/glympse/Glympse$EViews;

    sget-object v2, Lcom/glympse/android/glympse/Glympse$EAnimations;->None:Lcom/glympse/android/glympse/Glympse$EAnimations;

    sget-object v3, Lcom/glympse/android/glympse/Glympse$EAnimations;->SlideRight:Lcom/glympse/android/glympse/Glympse$EAnimations;

    invoke-virtual {v0, v1, v2, v3}, Lcom/glympse/android/glympse/Glympse;->PushView(Lcom/glympse/android/glympse/Glympse$EViews;Lcom/glympse/android/glympse/Glympse$EAnimations;Lcom/glympse/android/glympse/Glympse$EAnimations;)Lcom/glympse/android/glympse/Glympse$EViews;

    goto :goto_0

    .line 1304
    :catch_0
    move-exception v0

    move-object v7, v0

    .line 1306
    .local v7, e:Ljava/lang/Exception;
    invoke-static {v7}, Lcom/glympse/platform/common/Helpers;->Log(Ljava/lang/Throwable;)V

    goto :goto_1

    .line 1313
    .end local v7           #e:Ljava/lang/Exception;
    :cond_3
    const/4 v1, 0x0

    goto :goto_2
.end method
